package com.bing.jh.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bing.bingPro.util.ProvinceUtil;
import com.bing.jh.domain.DzWzCostMatchDtl;
import com.bing.jh.entity.dto.TZwArchivesDto;
import com.bing.jh.entity.vo.DzWzCostMatchDtlVO;
import com.bing.jh.service.DzWzCostMatchDtlService;
import com.bing.jh.mapper.DzWzCostMatchDtlMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author ck
* @description 针对表【dz_wz_cost_match_dtl】的数据库操作Service实现
* @createDate 2024-06-09 14:59:55
*/
@Service
public class DzWzCostMatchDtlServiceImpl extends ServiceImpl<DzWzCostMatchDtlMapper, DzWzCostMatchDtl>
    implements DzWzCostMatchDtlService{

    @Override
    public List<DzWzCostMatchDtlVO> list(TZwArchivesDto tZwArchives) {
        tZwArchives.setMonth(tZwArchives.getMonth().replace("-", ""));
        List<DzWzCostMatchDtlVO> list = baseMapper.list(tZwArchives);
        list.forEach(dzWzCostMatchDtlVO -> {
            dzWzCostMatchDtlVO.setMatchAnomalyType(ProvinceUtil.matchAnomalyType(dzWzCostMatchDtlVO.getMatchAnomalyType()));
        });
        return list;
    }

    @Override
    public List<String> dateList() {
        return baseMapper.dateList();
    }
}




